package com.squirrel.serialportcore.exception;

import org.slf4j.Logger;

/**
 * 核心报错
 *
 * @author Squbi
 * @date 2021/3/3 11:32
 */
public class CoreException extends RuntimeException {

    public CoreException() {
        super();
    }

    public CoreException(String message) {
        super(message);
    }

    public CoreException(Logger logger, String message) {
        logger.error(message);
    }

    public CoreException(String message, Throwable cause) {
        super(message, cause);
    }

    public CoreException(Throwable cause) {
        super(cause);
    }

    public CoreException(Logger logger, Throwable e, String message, Object... o) {
        logger.error(message, o);
        e.printStackTrace();
    }

    public CoreException(Logger logger, String message, Object... o) {
        logger.error(message, o);
    }

    protected CoreException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
